home *** CD-ROM | disk | FTP | other *** search
- Path: wkaufman.us.oracle.com!wkaufman
- From: wkaufman@wkaufman.us.oracle.com (William Kaufman)
- Newsgroups: comp.lang.c
- Subject: Re: memory allocation using malloc and free
- Date: 20 Feb 1996 06:40:39 GMT
- Organization: Oracle Corporation, Redwood Shores CA
- Message-ID: <4gbqd7$1em@inet-nntp-gw-1.us.oracle.com>
- References: <4gagll$5rc@bertrand.ccs.carleton.ca> <danpop.824767980@rscernix>
- NNTP-Posting-Host: wkaufman.us.oracle.com
-
- In article <danpop.824767980@rscernix> danpop@mail.cern.ch (Dan Pop) writes:
- ] In <4gagll$5rc@bertrand.ccs.carleton.ca> tcope@chat.carleton.ca (Tyler Cope) writes:
- ]
- ] >Could someone please demonstrate the proper (or _a_ proper) ANSI
- ] >method of allocating >64K space using malloc and free.
- [...]
- ]
- ] The usual workaround on unextended MSDOS is to use vendor-specific
- ] functions which take long or unsigned long arguments. Of course, this
- ] has nothing to do with ANSI C any longer.
-
- One work-around which _is_ ANSI C would be to break the allocation
- down into a two-dimensional array where each dimension is less than 64K.
- The memory won't be continguous anymore, but this is often not a severe
- restriction. And, it's portable.
-
- -- Bill K.
-
- Bill Kaufman | " While not a master of intellect, the blatantly
- wkaufman@us.oracle.com | obvious things we take for granted never
- | escape his keen eye! " -- Bob Burden
-